package com.coding.springboot.demo.entity;

import com.coding.springboot.demo.util.IDUtils;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * Created by qince on 2015/7/3.
 */
@MappedSuperclass
public class IDEntity implements Serializable {
    @Id
    @Column(name = "ID",length = 64,nullable = false,unique = true)
    protected String id = IDUtils.randomUUID();

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

}
